<script type="text/javascript">
	
	
	 
	$(document).ready(function() {		
		$("#getbarang").fancybox();	
		});	
	
	 
		
	$(document).ready(function() {
		 $('#pengeluaran_kas').submit(function() { 
			
			$.ajax({
				type: 'POST',
				url: "<?=base_url().'index.php/pengeluaran_kas/view_posting_pengeluaran_kas/'?>",
				data: $('#pengeluaran_kas').serialize(),
				success: function(data) {
					$.fancybox(data, {
						'width' : '800',
						'height': '600'
					  });
				}
			});
			return false;		
		}); 
		
		$("#getakun").fancybox();
		//get_total_kas();
	});
	
	function set_detail(){		
		if(document.getElementById('detail_akunid').value == ''){

			alert('Isi nama barang terlebih dahulu.');

		}else{

			$.ajax({

				type: 'POST',

				url: '<?=base_url().'asset/admin/js/ajax_pengeluaran_kas.php?command=add_1'?>',

				data: $('#pengeluaran_kas').serialize(),

				success: function(data) {

					$('#detail').html(data);

				}

			});

			

			document.getElementById('detail_akunid').value = '';	
			document.getElementById('detail_nakun').value = '';
			document.getElementById('detail_jumlah').value = '';
			document.getElementById('detail_count').value = '';

		}

	}
	
	function save_data(){
		var isi = document.getElementById('detail').innerHTML;
		if( isi == false){
			document.getElementById('alert_yanto').innerHTML = '<ul class="message error grid_12"><li>List data barang tidak boleh kosong</li><li class="close-bt"></li></ul><br>';

			alert('kosong');

			$('html, body').stop().animate({

				scrollTop: 0 //$($anchor.attr('href')).offset().top

			}, 700, 'easeInOutExpo');

		}else{

			document.getElementById('alert_yanto').innerHTML = '';
			alert('berisi');
			document.forms["pengeluaran_kas"].submit();
		}

		

	}
	
	
	function remove_detail(id){

		$.ajax({

			type: 'POST',

			url: '<?=base_url().'asset/admin/js/ajax_pengeluaran_kas.php?command=remove&id='?>'+id,

			data: $('#pengeluaran_kas').serialize(),

			success: function(data) {

				$('#detail').html(data);

			}

		});
	}
	
	function batal(){
		document.location.href = '<?=base_url().'index.php/pengeluaran_kas'?>';
	}
	
	 
	function klick_tanggal(){

		var tanggal = document.getElementById("tanggal");

		tanggal.focus();

	} 
	
	$(function(){

		$("#tanggal").datepicker({dateFormat: 'yy-mm-dd' });

	})	
	
</script>
						 
<script  type="text/javascript">
    $(document).ready(function(){
		$("#tahun").change(function(){
            var nilaitahun = $("#tahun").val();
			//var pecah=nilaiparent_1.split(".");
			//var nilaiparent_1_awal = pecah[0]+'.'+pecah[1]+'.'+pecah[2]+'.';
			//var nilaiparent_1_akhir = '.'+pecah[4]+'.' + pecah[5]+'.'+pecah[6]+'.'+pecah[7];
			//var nilaiparent_1_gabungan = nilaiparent_1 + '#' + nilaiparent_1_awal + '#' + nilaiparent_1_akhir;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_1",
			   data : "tahun=" + nilaitahun, 
               success: function(data){
                   $("#parent_1").html(data);
               }
            });
			
			 
			document.getElementById('link').value = document.getElementById('tahun').value;
			//document.write(link); 
			//alert(link);
			//$("#table_hide").show();
			$("#div_parent_1").show();
			$("#div_parent_2").hide();
			$("#div_parent_3").hide();
			$("#div_parent_4").hide();
			$("#div_parent_5").hide();
			$("#div_parent_6").hide(); 
        });
        $("#parent_1").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_1 = $("#parent_1").val();
			var pecah=nilaiparent_1.split(".");
			var nilaiparent_1_awal = pecah[0]+'.'+pecah[1]+'.'+pecah[2]+'.';
			var nilaiparent_1_akhir = '.'+pecah[4]+'.' + pecah[5]+'.'+pecah[6]+'.'+pecah[7];
			var nilaiparent_1_gabungan = nilaiparent_1 + '#' + nilaiparent_1_awal + '#' + nilaiparent_1_akhir + '#' + nilaitahun;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_2",
			   data : "parent_1=" + nilaiparent_1_gabungan, 
               success: function(data){
                   $("#parent_2").html(data);
               }
            });
			$("#div_parent_1").show();
			$("#div_parent_2").show();
			$("#div_parent_3").hide();
			$("#div_parent_4").hide();
			$("#div_parent_5").hide();
			$("#div_parent_6").hide(); 
        });
        $("#parent_2").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_2 = $("#parent_2").val();
			var pecah2=nilaiparent_2.split(".");
			var nilaiparent_2_awal = pecah2[0]+'.'+pecah2[1]+'.'+pecah2[2]+'.'+pecah2[3]+'.';
			var nilaiparent_2_akhir = '.' + pecah2[5]+'.'+pecah2[6]+'.'+pecah2[7];
			var nilaiparent_2_gabungan = nilaiparent_2 + '#' + nilaiparent_2_awal + '#' + nilaiparent_2_akhir + '#' + nilaitahun;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_3",
			   data : "parent_2=" + nilaiparent_2_gabungan, 
               success: function(data){
                   $("#parent_3").html(data);
               }
            });
			$("#div_parent_1").show();
			$("#div_parent_2").show();
			$("#div_parent_3").show();
			$("#div_parent_4").hide();
			$("#div_parent_5").hide();
			$("#div_parent_6").hide(); 
        }); 
        $("#parent_3").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_3 = $("#parent_3").val();
			var pecah3=nilaiparent_3.split(".");
			var nilaiparent_3_awal = pecah3[0]+'.'+pecah3[1]+'.'+pecah3[2]+'.'+pecah3[3]+'.'+pecah3[4]+'.';
			var nilaiparent_3_akhir = '.'+pecah3[6]+'.'+pecah3[7];
			var nilaiparent_3_gabungan = nilaiparent_3 + '#' + nilaiparent_3_awal + '#' + nilaiparent_3_akhir + '#' + nilaitahun;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_4",
			   data : "parent_3=" + nilaiparent_3_gabungan, 
               success: function(data){
                   $("#parent_4").html(data);
               }
            });
			$("#div_parent_1").show();
			$("#div_parent_2").show();
			$("#div_parent_3").show();
			$("#div_parent_4").show();
			$("#div_parent_5").hide();
			$("#div_parent_6").hide(); 
        }); 
        $("#parent_4").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_4 = $("#parent_4").val();
			var pecah4=nilaiparent_4.split(".");
			var nilaiparent_4_awal = pecah4[0]+'.'+pecah4[1]+'.'+pecah4[2]+'.'+pecah4[3]+'.'+pecah4[4]+'.'+pecah4[5]+'.';
			var nilaiparent_4_akhir ='.'+pecah4[7];
			var nilaiparent_4_gabungan = nilaiparent_4 + '#' + nilaiparent_4_awal + '#' + nilaiparent_4_akhir + '#' + nilaitahun;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_5",
			   data : "parent_4=" + nilaiparent_4_gabungan, 
               success: function(data){
                   $("#parent_5").html(data);
               }
            });
			$("#div_parent_1").show();
			$("#div_parent_2").show();
			$("#div_parent_3").show();
			$("#div_parent_4").show();
			$("#div_parent_5").show();
			$("#div_parent_6").hide(); 
        }); 
        $("#parent_5").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_5 = $("#parent_5").val();
			var pecah5=nilaiparent_5.split(".");
			var nilaiparent_5_awal = pecah5[0]+'.'+pecah5[1]+'.'+pecah5[2]+'.'+pecah5[3]+'.'+pecah5[4]+'.'+pecah5[5]+'.'+pecah5[6]+'.';
			var nilaiparent_5_akhir =pecah5[7];
			var nilaiparent_5_gabungan = nilaiparent_5 + '#' + nilaiparent_5_awal + '#' + nilaiparent_5_akhir + '#' + nilaitahun;
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/getParent_6",
			   data : "parent_5=" + nilaiparent_5_gabungan, 
               success: function(data){
                   $("#parent_6").html(data);
               }
            });
			$("#div_parent_1").show();
			$("#div_parent_2").show();
			$("#div_parent_3").show();
			$("#div_parent_4").show();
			$("#div_parent_5").show();
			$("#div_parent_6").show(); 
        });
        $("#parent_6").change(function(){
			var nilaitahun = $("#tahun").val();
            var nilaiparent_6 = $("#parent_6").val();
            $.ajax({
               type : "POST",
               url  : "<?php echo base_url(); ?>index.php/pengeluaran_kas/jumlah_kas",
			   data : "parent_6=" + nilaiparent_6, 
               success: function(data){
                  // $("#jumlah_kas").html(data);
					var pecah=data.split("#");
				   document.getElementById('jumlah_kas').value = pecah[0];	
				   document.getElementById('realisasi').value = pecah[1];	
				   document.getElementById('sisa').value = pecah[2];	
               }
            });
			 $("#divjumlah_kas").show(); 
			 $("#divrealisasi").show(); 
			 $("#divsisa").show(); 
        });
    });
	
</script>	
<script type="text/javascript">


			var newTotal=0;
			var newTotal_k=0;
			var counter = 0;
			var cancel_b = 0;
		function reset_txt(){
			document.getElementById('debet0').value=0;
			document.getElementById('kredit0').value=0;			
			document.getElementById('jumlah_pemasukan').value=0;			
			document.getElementById('jumlah_pengeluaran').value=0;			
			document.getElementById('jumlah_refund').value=0;			
		}
		$(document).ready(function(){
			$("#getakun0").fancybox({
				'width'         : 470,
				'max-height'    : 500,
				'autoDimensions': false,
				'autoScale'     : false,
				'transitionIn'  : 'elastic',
				'transitionOut' : 'elastic',
			});


            $('#addInputs').click(function(event){
                    event.preventDefault();
                    addInputEl() ;
            });
			
			$('#removeBtn').click(function(event){
                    event.preventDefault();
                    removeInputElm() ;
            });
            /*
            $('.textInput').live('blur', function(e) {
                prodCode = this.value;
                    addElement(prodCode) ;
            });
            
            $('.textInput').live('focus', function(e) {
                    prodCode = this.value;
                    checkElement(prodCode) ;
            });*/
			change_radio();
			reset_txt();
			
			
        });
		
		function addInputEl(){
			var akunidlastrow=document.getElementById('akunid' + counter).value;
			if (akunidlastrow!= 0 ){
				
				counter = counter+1;
				var val_radio = "pemasukan";
				inCon = document.getElementById('inputList');
				newP = document.createElement('p');
				
				newInput = document.createElement('input');
				newInput2 = document.createElement('input');
				newInput3 = document.createElement('a');
				newInput4 = document.createElement('input');
				newInput5 = document.createElement('input');
				newInput6 = document.createElement('input');
				newInput7 = document.createElement('input');
				newInput8 = document.createElement('input');
				newInput9 = document.createElement('input');
				newInput10 = document.createElement('input');
				newInput11 = document.createElement('input');
				
				
				newInput_tr = document.createElement('tr');
				newInput_tr.setAttribute('align','center');
				newInput_tr.setAttribute('class','alternate-row');
				newInput_td = document.createElement('td');
				newInput_td2 = document.createElement('td');
				newInput_td3 = document.createElement('td');
				newInput_td4 = document.createElement('td');
				newInput_td5 = document.createElement('td');
				newInput_td6 = document.createElement('td');
				newInput_td7 = document.createElement('td');
				newInput_td8 = document.createElement('td');
				newInput_td9 = document.createElement('div');
				newInput_td10 = document.createElement('div');
				newInput_td11 = document.createElement('div');
				newInput_tdnull = document.createElement('div');
				
				newInput2.setAttribute('class', 'textInput');
				newInput2.setAttribute('name', 'kredit[]');
				newInput2.setAttribute('type', 'text');
				newInput2.setAttribute('onchange', "updateTotal_k('kredit[]')");
				
				
				
				/*newInput6.setAttribute('type','hidden');
				newInput6.setAttribute('onclick',"removeInputElmById(" + cancel_b + ")");
				newInput6.setAttribute('value','Remove');
				newInput6.setAttribute('name','btn_batal[]');*/
				
				newInput.setAttribute('class', 'textInput');
				newInput.setAttribute('name', 'debet[]');
				newInput.setAttribute('type', 'text');
				newInput.setAttribute('onchange', "updateTotal_d('debet[]')");
				
				newInput3.setAttribute('href', "<?=base_url().'index.php/pengeluaran_kas/show_akun/'?>"+ counter );
				newInput3.setAttribute('id', 'addAkun' + counter);
				newInput3.setAttribute('class', 'add_akun');
				newInput3.innerHTML="Add Akun";
				
				//newInput3.setAttribute('value', "Tambah Akun");
				newInput4.setAttribute('class', 'textInputLeft');
				newInput4.setAttribute('name', 'parent[]');
				newInput4.setAttribute('type', 'hidden');
				newInput4.setAttribute('id', 'parent' + counter);
				
				newInput5.setAttribute('class', 'textInputLeft');
				newInput5.setAttribute('name', 'akunid[]');
				newInput5.setAttribute('type', 'text');
				newInput5.setAttribute('id', 'akunid' + counter);
				
				newInput6.setAttribute('class', 'textInputLeft');
				newInput6.setAttribute('name', 'nakun[]');
				newInput6.setAttribute('type', 'text'); 
				newInput6.setAttribute('id', 'nakun' + counter);
				
				newInput7.setAttribute('class', 'textInput');
				newInput7.setAttribute('name', 'plafon[]');
				newInput7.setAttribute('type', 'hidden');
				newInput7.setAttribute('placeholder', 'plafon');
				newInput7.setAttribute('id', 'plafon' + counter);
				
				newInput8.setAttribute('class', 'textInput');
				newInput8.setAttribute('name', 'realisasi[]');
				newInput8.setAttribute('type', 'hidden');
				newInput8.setAttribute('placeholder', 'realisasi');
				newInput8.setAttribute('id', 'realisasi' + counter);
				
				newInput9.setAttribute('class', 'textInput');
				newInput9.setAttribute('name', 'sisa[]');
				newInput9.setAttribute('type', 'text');
				newInput9.setAttribute('placeholder', 'sisa');
				newInput9.setAttribute('id', 'sisa' + counter);
				
				newInput10.setAttribute('class', 'textInput');
				newInput10.setAttribute('name', 'kredit[]');
				newInput10.setAttribute('type', 'text');
				newInput10.setAttribute('placeholder', 'pengeluaran');
				newInput10.setAttribute('onchange', "updateTotal_k('kredit[]')" );
				newInput10.setAttribute('id', 'kredit' + counter);
				
				newInput11.setAttribute('type','button');
				newInput11.setAttribute('onclick',"removeInputElmById(" + cancel_b + ")");
				newInput11.setAttribute('value','Remove');
				newInput11.setAttribute('name','btn_batal[]');
				
				newInput_td.appendChild(newInput);  //debet
				newInput_td2.appendChild(newInput2); //kredit
				newInput_td3.appendChild(newInput3);
				newInput_td4.appendChild(newInput4);
				newInput_td4.appendChild(newInput5);
				newInput_td5.appendChild(newInput6);
				newInput_td6.appendChild(newInput7);
				newInput_td6.appendChild(newInput8);
				newInput_td6.appendChild(newInput9);
				newInput_td7.appendChild(newInput10);
				newInput_td8.appendChild(newInput11); //adding button cancel
				
				newInput_tr.appendChild(newInput_td3);
				newInput_tr.appendChild(newInput_td4);
				newInput_tr.appendChild(newInput_td5);
				newInput_tr.appendChild(newInput_td6);
				newInput_tr.appendChild(newInput_td7);
				newInput_tr.appendChild(newInput_td8);
				//newInput_tr.appendChild(newInput_td9);
				//newInput_tr.appendChild(newInput_td10);
				//pembelian==pemasukan==kas di debet
				
				cancel_b = cancel_b +1;
				if (val_radio=='pemasukan'){
					/*newInput_tr.appendChild(newInput_tdnull);*/
					//newInput_tr.appendChild(newInput_td);
					
					newInput_tr.appendChild(newInput_td8);
					inCon.appendChild(newInput_tr);
				}else if(val_radio=='pengeluaran'){
					//newInput_tr.appendChild(newInput_td);
					//newInput_tr.appendChild(newInput_tdnull);
					
					newInput_tr.appendChild(newInput_td8);
					inCon.appendChild(newInput_tr);
				}
				
				$("a.add_akun").fancybox({'width': 340,
					'width'         : 470,
					'max-height'    : 500,
					'autoDimensions': true,
					'autoScale'     : true,
					'transitionIn'  : 'elastic',
					'transitionOut' : 'elastic',
				});
			}else{
				alert('Isi Terlebih Dahulu Input Text yang di atas');
			}
		}
		
		function removeInputElm(){
			tagAll = document.getElementsByTagName("*");
			inCon = document.getElementById('inputList');
			var jumlah = 0;
			for (var i=0;i<tagAll.length;i++){
				if (tagAll[i].getAttribute("name")=='btn_batal[]') {jumlah++};
			}
			jumlah = Number(jumlah);
			newP = document.getElementsByTagName('tr');
			child=inCon.children[jumlah-1];
			inCon.removeChild(child);
		}
		
		function change_radio(){
			tagAll = document.getElementsByTagName("*");
			inCon = document.getElementById('inputList');
			var jumlah = 0;
				for (var i=0;i<tagAll.length;i++){
					if (tagAll[i].getAttribute("name")=='btn_batal[]') {
						jumlah++;
					}
				}
			jumlah = Number(jumlah);
				
			for (var j=0;j<jumlah;j++){
				child=inCon.children[0];
				inCon.removeChild(child);
			}
			
			var val_radio = $('input:radio[name=id_pilihan]:checked').val();
			reset_txt();
			if (val_radio=='pemasukan'){
				document.getElementById('kredit0').readOnly =true ;
				document.getElementById('debet0').readOnly =false ;
			}else if(val_radio=='pengeluaran'){
				document.getElementById('debet0').readOnly =true ;
				document.getElementById('kredit0').readOnly =false ;
			}
		}
		function removeInputElmById(numb){
			inCon = document.getElementById('inputList');
			newP = document.getElementsByTagName('tr');
			child=inCon.children[numb];
			inCon.removeChild(child);
			
			//replaceChild() 
		}
		
		function updateTotal_d(s){
			var allEls=document.getElementsByTagName("*");
			newTotal = 0;
				for(var i=0;i<allEls.length;i++)
				{
					if(allEls[i].getAttribute("name")!=s)continue;
					if(isNaN(allEls[i].value))continue;
					//newTotal+=new Number(allEls[i].value);
					newTotal = newTotal + Number(allEls[i].value);
				}
			var f=document.getElementById("jumlah_pemasukan");
			f.value= newTotal;
			sum_total();	
		}
		
		function updateTotal_k(s){
			var allEls_k=document.getElementsByTagName("*");
			newTotal_k = 0;
				for(var i=0;i<allEls_k.length;i++)
				{
					if(allEls_k[i].getAttribute("name")!=s)continue;
					if(isNaN(allEls_k[i].value))continue;
					//newTotal_k+=new Number(allEls_k[i].value);
					newTotal_k = newTotal_k + Number(allEls_k[i].value);
				}	
				var f=document.getElementById("jumlah_pengeluaran");
				f.value= newTotal_k;
				sum_total();
				cek_sisa();
		}
		
		
		
		
		function sum_total(){
			var e=document.getElementById("jumlah_refund");
			var f=document.getElementById("jumlah_pemasukan");
			var g = document.getElementById("jumlah_pengeluaran");
			
			e.value= f.value - g.value;
		}
		
		/*
		function cek_sisa()
		{
			val pengeluaran[0] = document.getElementById("pengeluaran[0]");
			val sisa[0] = document.getElementById("sisa[0]");
			if (pengeluaran[0] > sisa[0] )
			{
				alert ("Sisa tidak mencukupi");
			}
			else
			{
				alert("mencukupi");
			}
		}
*/

</script>

<div id="page-heading"><h1>Pengeluaran Kas</h1></div>
<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
<tr>
	<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
	<th class="topleft"></th>
	<td id="tbl-border-top">&nbsp;</td>
	<th class="topright"></th>
	<th rowspan="3" class="sized"><img src="<?php echo base_url() ?>asset/admin/images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
</tr>
<tr>
	<td id="tbl-border-left"></td>
	<td>
	<!--  start content-table-inner -->
	<div id="content-table-inner">
		<div id="table-content">
	<?php
		$attributes = array('name' => 'pengeluaran_kas', 'id' => 'pengeluaran_kas', 'class'=>'block-content form');
		echo form_open('pengeluaran_kas/view_posting_pengeluaran_kas', $attributes);
	?>
	<table border="0" width="100%" cellpadding="0" cellspacing="0">
	<tbody>
	<tr valign="top">
		<td>
			<!--  start step-holder -->
			<div id="step-holder">
						<div class="step-no">1</div>
						<div class="step-light-left"><?php 
							echo anchor('pengeluaran_kas/index', 'List Pengeluaran Kas');
						 ?></div>
						<div class="step-light-right"></div>
						<div class="step-no">2</div>
						<div class="step-dark-left"><?php 
							echo anchor('pengeluaran_kas/insert', 'Tambah Pengeluaran');
						 ?></div>
						<div class="step-dark-round"></div>
											
						<div class="clear"></div>
					</div>
					 
						<!--  end step-holder -->
		
			<!-- start id-form -->
			<table border="0" cellpadding="0" cellspacing="0"  id="id-form" width="100%">
				
				<!--
				<tr>
					
					<th valign="top">Program (Kode Kas) : </th>
					<td>	
					
		 
						 
						
						<select name="tahun" id="tahun" style="display:none; margin-top:5px;"  >
						<option value="">--Pilih Tahun--</option>
						<?php
						 	
								foreach($tahun->result()  as $row)
									{
										echo '<option value="'.$row->id_anggaran.'">'.$row->tahun.'-'.$row->id_anggaran.'</option>';
									}						
						?>
						</select>
						<br/>
						
						<div id="div_parent_1" style="display:none; margin-top:5px;" >
							<table name="parent_1" id="parent_1">
								  	
							</table>
							<br/> 
						</div>
						
						<div id="div_parent_2" style="display:none; margin-top:5px;" >
							<select name="parent_2" id="parent_2">
								<option value="">--Pilih--</option>        	
							</select>
							<br/> 
						</div>
						
						<div id="div_parent_3" style="display:none;margin-top:5px;">
							<select name="parent_3" id="parent_3">
								<option value="">--Pilih--</option>        	
							</select>
							<br/> 
						</div>
						
						<div id="div_parent_4" style="display:none;margin-top:5px;">
							<select name="parent_4" id="parent_4">
								<option value="">--Pilih--</option>        	
							</select>
							<br/> 
						</div>	

						<div id="div_parent_5" style="display:none;margin-top:5px;">
							<select name="parent_5" id="parent_5">
								<option value="">--Pilih--</option>        	
							</select>
							<br/> 
						</div>	
						
						<div id="div_parent_6" style="display:none;margin-top:5px;">
							<select name="parent_6" id="parent_6">
								<option value="">--Pilih--</option>        	
							</select>
							<br/> 
						</div>	
						
					</td>
					 
				</tr>
				-->
				<tr id="divjumlah_kas" style="display:none;margin-top:5px;">
					<th valign="top">Jumlah Nominal : </th>
					<td><input type="text" name="jumlah_kas" id="jumlah_kas" value="" class="inp-form" readonly="true"><div id="getkas"></div></td>
				</tr>
				<tr id="divrealisasi" style="display:none;margin-top:5px;">
					<th valign="top">Realisasi : </th>
					<td><input type="text" name="realisasi" id="realisasi" value="" class="inp-form" readonly="true"><div id="getkas"></div></td>
				</tr>
				<tr id="divsisa" style="display:none;margin-top:5px;">
					<th valign="top">Sisa : </th>
					<td><input type="text" name="sisa" id="sisa" value="" class="inp-form" readonly="true"><div id="getkas"></div></td>
				</tr>
				<tr>
					<th valign="top">Jurnal ID : </th>
					<td class="noheight">
						<input type="text" name="glid" id="glid" class="inp-form" value="<?=$glid?>" readonly="true" >
					</td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Tanggal : </th>
					<td class="noheight">
						<input type="text" name="tanggal" id="tanggal" class="inp-form" value="<?=date('Y-m-d')?>" class="datepicker">
						<img onclick="javascript:klick_tanggal()" src="<?=base_url()?>asset/admin/images/icons/fugue/calendar-month.png" width="16" height="16">
					
					</td>
					<td></td>
				</tr>
				<tr>
					<th valign="top">Keterangan : </th>
					<td class="noheight">
						<input type="text" name="keterangan" id="keterangan" class="inp-form" value="" >
					</td>
					<td></td>
				</tr>
				<tr><th></th><td></td></tr>
				<tr><th></th><td></td></tr>
				
		<!-- end id-form  --> 
		<tr><td colspan="2">  
		<div   id="table_hide"   >
		<table>
				
					<tr>
						<th><input name="addInputs" id="addInputs" type="button" value="Add Row" onclick="set_detail()" />
						<!--<input name="removeBtn" id="removeBtn" type="button" value="Remove Row"  />
						<input name="link" id="link" type="text" value=""  /></th>-->
					</tr>
					<tr>
						<td colspan="4">			
						<table class="table" border="1" cellspacing="0" width="100%" id="transaction-table">
							<thead>
								<tr>
									<th class="table-header-repeat line-left minwidth-1">Pilih Akun</th>
									<!--<th class="table-header-repeat line-left minwidth-1">Parent</th>-->
									<th class="table-header-repeat line-left minwidth-1">Akun Id</th>
									<th class="table-header-repeat line-left minwidth-1"><a href="">Nama Akun</a></th>
									<th class="table-header-repeat line-left minwidth-1">Debet</th>
									<th class="table-header-repeat line-left minwidth-1">Kredit</th>
									<!--<th class="table-header-repeat line-left minwidth-1">Realisasi</th>
									<th class="table-header-repeat line-left minwidth-1">Sisa</th>-->
									<!--<th class="table-header-repeat line-left minwidth-1"><a href="">Pemasukan</a></th>-->
									<th class="table-header-repeat line-left minwidth-1"><a href="">Pengeluaran</a></th>
									<th class="table-header-repeat line-left minwidth-1"><a href="">Batal</a></th>
								</tr>
							</thead>
							<tbody id="items">
									<tr align="center" border="1" class="alternate-row">
										<td>
										<script type='text/javascript'>
										var link = document.getElementById('tahun').value;
										document.write(link);
										</script>
										
										<?//;?>
											<a id="getbarang" href="<?=base_url().'index.php/pengeluaran_kas/show_akun/0/'?><??>">Add Akun</a>
										</td>
										<td>
										<input class="textInputLeft" type="hidden" name="parent[]" id="parent0" value="">
										<!--</td>	
										<td>-->
										<input class="textInputLeft" type="text" name="akunid[]" id="akunid0" value=""></td>
										<td><input  class="textInputLeft" type="text"  name="nakun[]" id="nakun0" value=""></input></td>
										<td><input placeholder="plafon" class="textInput" type="hidden" name="plafon[]" id="plafon0" value=""> 
										<!--</td>
										<td>-->
										<input placeholder="realisasi" class="textInput" type="hidden" name="realisasi[]" id="realisasi0" value=""> 
										<!--</td>
										<td>-->
										<input placeholder="sisa" class="textInput" type="text" name="sisa[]" id="sisa0" value="">
										</td>
										<!--<td><input class="textInput" type="text" name="debet[]" id="debet0" onchange="updateTotal_d('debet[]')" value=""></td>-->
										<td><input placeholder="pengeluaran"class="textInput" type="text" name="kredit[]" id="kredit0" onchange="updateTotal_k('kredit[]')" value=""></td>
										<td></td>
									</tr>
								<tbody id="inputList">
								</tbody>
								<tr align="center" border="1" class="alternate-row">
									<!--<td></td>
									<td></td>
									<td></td>-->
									<td></td>
									<td></td>
									<td></td>
									<td></td>
									<!--<td><input type="text" name="jumlah_pemasukan" id="jumlah_pemasukan" value="" class="textInput" readonly="true"></td>-->
									<td><input type="text" name="jumlah_pengeluaran" id="jumlah_pengeluaran" value="" class="textInput" readonly="true"></td>
									<td></td>
								</tr><!--
								<tr align="center" class="alternate-row">
									<td colspan="3"></td>
									<td colspan="2" align="center"><input type="text" name="jumlah_refund" id="jumlah_refund" value="" class="textInput" readonly="true"></td>
									<td></td>
								</tr>-->
							</tbody>
						</table>
						</td>
					</tr>			
					<tr>
					
						<td valign="top">
							<input type="submit" value="Simpan" class="form-submit" />
							<input type="reset" value="Batal" class="form-reset"  />
						</td>
					</tr>	
					</table>
				</div>					
		</td></tr>
			</table>
		</td>					
	</tr>
	</tbody>							
	</table>
<div class="clear"></div>
</form>

</div></div>
<!--  end content-table-inner  -->
</td>
<td id="tbl-border-right"></td>
</tr>
<tr>
	<th class="sized bottomleft"></th>
	<td id="tbl-border-bottom">&nbsp;</td>
	<th class="sized bottomright"></th>
</tr>
</table>